/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Inrterface;

import Game.NewGame;
import Map.Map;
import Map.MapConfig;
import Map.MapLevel;
import Monsters.Monsters;
import Player.Inventory;
import Player.Player;
import jcgame.Main;
import net.slashie.libjcsi.CSIColor;

/**
 *
 * @author insane
 */
public class Info {

    public static void draw(Map map) {
        int x = MapConfig.getInstance().getPadding_left() + MapConfig.getInstance().getViewSizeWidth() * 2 + 4;
        
        String add;
        if (NewGame.getPlayer().getExpPoints() > 0) {
            add = " + ";
        } else {
            add = "";
        }

        Main.csi.print(x, 2, "Locate: " + map.x + " - " + map.y, CSIColor.GRAY);
        Main.csi.print(x, 3, "Map Level: " + MapLevel.getInstance().getLevel() + "", CSIColor.GRAY);
        Main.csi.print(x, 4, "Name: " + NewGame.getPlayer().getName() + "", CSIColor.GRAY);
        Main.csi.print(x, 5, "Step: " + NewGame.getPlayer().getStep() + "", CSIColor.GRAY);

        Main.csi.print(x, 7, "Hero level: " + NewGame.getPlayer().getLevel(), CSIColor.GRAY);
        Main.csi.print(x, 8, "Exp Points: " + NewGame.getPlayer().getExpPoints(), CSIColor.GRAY);
        Main.csi.print(x, 9, "Experience: " + NewGame.getPlayer().getExp() + "/" + NewGame.getPlayer().getNextLevel(NewGame.getPlayer().getLevel()), CSIColor.GRAY);

        Main.csi.print(x, 10, "Str (s): " + NewGame.getPlayer().getStr() + add, CSIColor.GRAY);
        Main.csi.print(x, 11, "Dex (d): " + NewGame.getPlayer().getDex() + add, CSIColor.GRAY);
        Main.csi.print(x, 12, "Hlt (h): " + NewGame.getPlayer().getHlt() + add, CSIColor.GRAY);
        Main.csi.print(x, 13, "Int (i): " + NewGame.getPlayer().getInt() + add, CSIColor.GRAY);

        Main.csi.print(x, 14, "Health: " + NewGame.getPlayer().getHealth() + "/" + NewGame.getPlayer().getMaxHealth(), CSIColor.GRAY);

        int[] belt = Inventory.getInstance().getBelt();
        for (int i = 0; i < belt.length; i++) {
            CSIColor color = CSIColor.SILVER;
            if (belt[i] == 1) {
                color = CSIColor.RED;
            }
            if (belt[i] == 2) {
                color = CSIColor.BLUE;
            }
            Main.csi.print(x + i * 2, 16, i + " ", color);
        }

        int mons = 0;
        if (map.getMonster() != null) {
            mons = map.getMonster().size();
        }
        Main.csi.print(x, 18, "Monsters in level: " + mons, CSIColor.GRAY);

    }

    private static void drawPointBelt() {
    }
}
